package com.test.encryption.controller;

import com.test.encryption.util.AesUtil;
import com.test.encryption.util.RsaUtil;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author zhangshijie
 * @date 2021/6/10 9:39
 */
@Controller
public class PageController {
    @GetMapping("/index")
    public String index(Model model){
        String publicKey = RsaUtil.getPublicKey();
        String privateKey = RsaUtil.getPrivateKey();
        String aesKey1 = AesUtil.getKey();
        model.addAttribute("publicKey1",publicKey);
        model.addAttribute("privateKey1",privateKey);
        model.addAttribute("aesKey1",aesKey1);
        return "index";
    }
}
